<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<body>

<div id="app">
    <p>{{currentTime1()}}</p>
    <p>{{currentTime2}}</p>
</div>

<script>
    var vm= new Vue(
        {
            el:"#app",
            data:{
                message:"asdd"
            },
            methods:{
                currentTime1:function ()
                {
                    return Date.now();
                }
            },
            computed:{//计算属性:methods.computed 方法名不能重名，重名之后只会调用methods方法 跟缓存差不多
                currentTime2:function ()
                {
                    return Date.now();
                }
            }
        }
    )
</script>

</body>
</html>